package com.rain.jwt.common;

/**
 * @author: wu
 * @date: 2021/9/25
 */
public enum ResultEnum {
    SUCCESS(200, "请求成功"),
    FAIL(101, "未知异常,请稍后重试"),
    TOKEN_ERROR(102, "token不合法"),
    TOKEN_EXP(103, "token已过期,请重新登录"),
    TOKEN_REFRESH(104, "请刷新token"),
    TOKEN_PARSE(105, "token解析异常"),
    TOKEN_SIGNER(106, "token签名器异常"),
    TOKEN_MUST(107, "token缺失"),
    PARAMS_CHECK(201, "参数校验失败"),
    BIZ(202, "业务异常"),
    ;

    private int code;
    private String msg;

    ResultEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
